package com.tuo51.core.domain.pay;

import com.tuo51.foudation.model.Domain;
import lombok.Data;
import org.hibernate.annotations.Table;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EntityListeners;
import java.util.Date;

/**
 * @author ：lgd
 * @date ：Created in 2020/10/29 17:40
 */
@Data
@Table(appliesTo = "wallet_withdrawal",comment = "用户提现")
@Entity(name="wallet_withdrawal")
@EntityListeners(AuditingEntityListener.class)
public class OrgWalletWithdrawRecord extends Domain {

    //提款信息
    @Column(name = "before_withdraw", columnDefinition = "INT COMMENT '提现前金额'")
    private Long beforeWithdraw;

    @Column(name = "apply_time", columnDefinition="DATETIME COMMENT '申请时间'")
    private Date applyTime;

    @Column(name = "fin_approved", columnDefinition = "bit(1) COMMENT '财务审核通过'")
    private Boolean finApproved;

    @Column(name = "fin_approve_time",columnDefinition="DATETIME COMMENT '财务审核通过时间'")
    private Date finApprovedAt;

    @Column(name = "fin_approve_comment", columnDefinition = "varchar(256) COMMENT '财务审核备注'")
    private String finApproveComment;

    @Column(name = "paid", columnDefinition = "bit(1) COMMENT '出纳打款'")
    private Boolean paid;

    @Column(name = "paid_at",columnDefinition="DATETIME COMMENT '出纳打款时间'")
    private Date paidAt;

    @Column(name = "paid_comment",columnDefinition="DATETIME COMMENT '出纳打款备注'")
    private String paidComment;

    @Column(name = "pay_time", columnDefinition="DATETIME COMMENT '支付时间'")
    private Date payTime;

    @Column(columnDefinition = "varchar(50) COMMENT '银行转账流水单号'")
    private String bankFlow;

    @Column(columnDefinition = "INT COMMENT '支付状态：0 已提现，1 待提现，2 取消提现'")
    private Integer payStatus;

    @Column(columnDefinition = "INT COMMENT '申请提现金额'")
    private Long amount;

    @Column(columnDefinition = "varchar(48) COMMENT '姓名，实名信息'")
    private String name;

    @Column(columnDefinition = "varchar(128) COMMENT '开户行'")
    private String bank;

    @Column(columnDefinition = "varchar(128) COMMENT '银行卡号'")
    private String bankNumber;

    @Column(columnDefinition = "varchar(128) COMMENT '备注'")
    private String remarks;

    @Column(columnDefinition = "bit(1) COMMENT '是否提现：0 否，1 是'")
    private Boolean successed;

}
